<template>
  <div>
    <router-view />
    <van-tabbar v-model="active">
      <van-tabbar-item icon="wap-home" to="/" name="home">首页</van-tabbar-item>
      <van-tabbar-item icon="video" to="/News" name="news"
        >资讯</van-tabbar-item
      >
      <van-tabbar-item badge="3" to="/Dynamic" name="dynamic">
        <span>动态</span>
        <template #icon="props">
          <img :src="props.active ? icon.active : icon.inactive" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item icon="manager" to="/User" name="user"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: "home",
      icon: {
        active: "http://47.100.42.191/images/dongtai2.png",
        inactive: "http://47.100.42.191/images/dongtai1.png",
      },
    };
  },
  methods() {},
};
</script>

<style></style>
